Repository navigation
feat(spec, platform-objects): the standard unit table and the organization unit object sys_unit (ADR-0158 U1-U3) - #35581
Conversation
…e and the organization unit object sys_unit ADR-0158 U1, U2 and U3. The spec gains STANDARD_UNITS, a closed table of UN/ECE Recommendation 20 codes with each code's dimension and its exact decimal-string ratio to the dimension's base unit (package codes carry no ratio; the piece is H87, C62 and EA are not members), and the organization code namespace pattern. platform-objects gains sys_unit: organization-owned, zero shipped rows, code in the namespace and unique per organization, code and dimension immutable, a ratio on every dimension but package, retiring in place of a hard delete. member_default reads it; organization admins write it. Claude-Session: https://claude.ai/code/session_01Utp6CajiB6BSQKWowy6YLB Co-authored-by: Claude <noreply@anthropic.com>
…rd; spec surface regenerated; changeset Open item 1: the standard table's 41 codes, seven dimensions, base units, exact ratios and their sources. Open item 2: sys_unit is owned by platform-objects, its field list, and its grants (members read, organization administrators write). Open item 11: a deleted code stays retired, spelled as a one-way retired flag that keeps the organization-scoped unique key held. Claude-Session: https://claude.ai/code/session_01Utp6CajiB6BSQKWowy6YLB Co-authored-by: Claude <noreply@anthropic.com>
…and field-attached rules with their pins Regenerates the object translation bundles for sys_unit, hand-translates its zh-CN strings, and attaches the code, dimension and retirement rules to the field each guards. The real-stack suite pins member read, administrator write, the namespace and immutability refusals and the retired code holding its key. Claude-Session: https://claude.ai/code/session_01Utp6CajiB6BSQKWowy6YLB Co-authored-by: Claude <noreply@anthropic.com>
…n reach Regenerated with node scripts/platform-object-tenancy-census.mjs --write. Claude-Session: https://claude.ai/code/session_01Utp6CajiB6BSQKWowy6YLB Co-authored-by: Claude <noreply@anthropic.com>
… creates and updates are served and a batched delete stays refused The apiMethods conformance ratchet requires bulk wherever single-record writes are granted; bulk admits only a granted child verb, so delete stays closed. Claude-Session: https://claude.ai/code/session_01Utp6CajiB6BSQKWowy6YLB Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 4 package(s): 59 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 18 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 187 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 67d898b2c7a036c7afdf20f584cfc3efdcd6467b && git checkout 67d898b2c7a036c7afdf20f584cfc3efdcd6467b
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin f981dce3be9b165502fb047954293b0de26ab97c 8037977d2bf6fdcf0cafc43e1f3012d3de64c21d && git checkout -B drift-repro f981dce3be9b165502fb047954293b0de26ab97c && git merge --no-ff 8037977d2bf6fdcf0cafc43e1f3012d3de64c21d
node scripts/docs-audit/affected-docs.mjs --json f981dce3be9b165502fb047954293b0de26ab97c
|
|
repo:objectstack#5 · os-bill · session_01Utp6CajiB6BSQKWowy6YLB Final head for review · area data-2 · 2026-11-19T16:14Z
|
|
repo:objectstack#5 · os-bill · session_01Utp6CXsZsKmgG1EcKp5bY4 维护者速读
席位核对L1-a: ACCEPT, with one item before the L2 · head Readings, my own:
R1 (before the L2): CI green on this head. At this reading, 15 success, 12 skipped and 24 still File surface. Every path is inside the claim: the spec constant and its export, The spec table (
The object (
Pins (names grepped).
Declaration: agreed.
The ADR-0158 notes (OI1 table, OI2 owner/fields/grants, OI11 retire) match the code. The OI11 note states the engine-level delete gap itself. The two open readings (the seat rules).
Routing. L2 is owed at |
Claude-Session: https://claude.ai/code/session_01Utp6CajiB6BSQKWowy6YLB Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#5 · os-bill · session_01Utp6CXsZsKmgG1EcKp5bY4 维护者速读
席位核对L1-a delta: ACCEPT, with one required item and R1 still open · head Delta. One commit, one file:
The red on R1 (from 7014935271, still open): CI green on this head. At this reading: 5 skipped, 18 R2 (new, required before queueing): amend the claim. Unchanged. The declaration, the routing, and the two open readings for the seat are as in 7014935271: L2 at |
|
repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ Contract reviewServed-tier: PR #35581, card #35488, ADR-0158 U1 to U3. Read: the card's body and its three comments; the PR body, its 54 files (+2457/−13) and the net diff against The security line reads yes because the diff teaches permission behaviour: a new read line on the member baseline, who creates, edits and retires a unit, and the tenant wall's reach. The PR is Tier H on its ADR path whatever that line says. Two readings in this record are for the maintainer to confirm at approval. This review recommends on each and settles neither. They are under ③. ① Derived judgments
② Semver level
③ Boundary flagsReading 1, the dev's first open question. For the maintainer to confirm at approval. L1 says "deleting an org unit is allowed" and Open item 2 asks who deletes. The PR spells that delete as a one-way Recommendation: confirm it as shipped (the dev's option A). Reasons:
Four things the maintainer should have in hand when confirming:
Reading 2, the dev's second open question. For the maintainer to confirm at approval. By reading the tree at this head, that unmeasured half has an answer: yes. A path that an organization administrator can author reaches an engine delete on Recommendation: confirm the deferral to the membership card (the dev's option A), on one condition. Reasons:
The condition: the carry is written down before this lands, as two lines on #35489: an engine-side refusal of a delete on The same card should take L1-a's note with it: a real-stack cell for a refused delete. The dev's other flags.
L1-a's two items. R1, green CI on this head: confirmed below. R2, the claim amendment for the pin file: posted ( CI on the head. 74 check-runs on SQL push-down. The diff builds no query, materialises no ids and joins nothing in the app. Nothing to flag. For the lane seat's ACCEPT, outside ④. Tenant isolation is pinned as the declaration the wall reads, and as the stamped ④ Design judgmentNo must-fix, no should-fix.
Nits. None moves the head. The three on the ADR's prose face can ride the amendment that records the maintainer's confirmation of the readings; the rest are follow-ups.
Implemented-by: VERDICT: PASS |
|
repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ Contract reviewServed-tier: Delta review d1, merge-only, on PR #35581 (card #35488). It reads from The two readings of that record are still for the maintainer to confirm at approval. The merge changes neither, and this round settles neither. ① Derived judgments
② Semver levelThe changeset file and both declaration lines are unchanged. ③ Boundary flags
④ Design judgmentNo must-fix, no should-fix.
Nits. N1 to N6 of the first record stand as written. The merge touches none of them, and this round adds none. Implemented-by: VERDICT: PASS |
|
repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ 维护者速读
席位核对 — ACCEPT · repo:objectstack#5 · head
|
Requested by Bill · project thread
Fixes #35488
Refs #35465
Refs #35466
Clause-②: yes (widening)
Metadata-protocol: none
维护者速读
席位核对 (seat check)
ValueDomainSchemamember (pinned: it keeps 3 members). U2 pieceH87;C62andEAabsent from the table and refused as org codes. U3sys_unitorg-owned,organization_idinjected (census reachin, tenant fieldorganization_id; the integration test reads it stamped), zero shipped rows (pinned on the manifest), org codes at least 4 characters or containing_. Members read it. L1: ratio written only by an org admin or owner, field history on every column, code and dimension refused on change. L2: onelabelcolumn. U6/L4/OI10:decimal_places(0 to 12) on the row.retired, one way). There is no hard delete through the data API or Setup. If the seat reads L1 as requiring a physical delete, OI11 as recommended cannot hold and this needs a ruling.platform-objects, field list, grants. OI11: a deleted code stays retired; mechanism and pins listed in the ADR note.packages/cli/test/connect-agent-both-halves-wire.pin.test.ts: Test Core 1/10 went red on298bbb987because that pin counts the Setup tree at 31, and the newnav_units_of_measureentry makes it 32.c890bf191sets both counts to 32 and asserts the entry is present.unitConfig, no field key, no write-path membership check, no renderer, no Units of measure R1: an organization setting for how many decimal places each standard unit displays #35498 setting.count(baseH87, withPRandDZNas multiples), because a pair and a dozen are counts, not pieces. The reasoning is in the ADR OI1 note.What changes
@objectstack/spec(@objectstack/spec/data):STANDARD_UNITS(41 UN/ECE Rec 20 codes),UNIT_DIMENSIONS,UNIT_DIMENSION_BASE_CODES(KGM,MTR,MTK,MTQ,SEC,H87),ORGANIZATION_UNIT_CODE_PATTERN;sys_unitjoinsPLATFORM_OBJECTS_BY_PACKAGE['platform-objects']. The api-surface and export-origins files are regenerated.@objectstack/platform-objects:sys_unit(code, label, dimension, ratio scale 12, decimal_places, retired), its rules (namespace format; code, dimension and retired one way; ratio required except onpackageand refused onpackage), the org-scoped unique key oncode,apiMethodsget list create update bulk, Setup → Configuration → Units of Measure, and the translation bundles (zh-CN translated; the other locales take the generator's English fill).@objectstack/plugin-security:member_defaultreadssys_unit(no create, edit or delete).@objectstack/cli: the organization-ownership inventory listssys_unitas attributed.scripts/platform-object-tenancy-census.jsonis regenerated (104 registered, 53 in reach).First files to read, by risk:
packages/platform-objects/src/system/sys-unit.object.ts, thevalidationsblock andenable.apiMethods: these carry L1 and OI11.packages/plugins/plugin-security/src/objects/default-permission-sets.ts, thesys_unitrow inmember_default.packages/spec/src/data/standard-units.ts, the ratio table.Two-minute check:
pnpm --filter @objectstack/plugin-security exec vitest run --maxWorkers=2 src/default-permission-sets.unit-of-measure.integration.test.tsshould print 14 passed. It boots a real stack and shows a member reading but refused writes, an admin writing, refused codes, immutability refusals, and re-creating a retired code refused with 409.Tests
All tests below ran on head
298bbb987, with the tree byte-identical to the commit.Package suites (under the verify lock, `set -e`)
@objectstack/spec:src/data/standard-units.test.ts,src/data/api-methods-batch-conformance.test.ts,platform-object-names,platform-tool-namesandvalue-domain: Test Files 5 passed (5), Tests 67 passed (67).@objectstack/platform-objectsfull suite: Test Files 125 passed (125), Tests 2092 passed (2092).@objectstack/cliunit layer, inventory tests: Test Files 1 passed (1), Tests 26 passed (26). The integration layer is left to CI because the diff does not touch it.@objectstack/plugin-securityfull suite: Test Files 282 passed (282), Tests 7050 passed, 45 skipped (7095). This includes the newdefault-permission-sets.unit-of-measure.integration.test.ts(14).spec,platform-objectsandplugin-securitygave VERDICT command-exit 0.cligave VERDICT command-exit 0.Acceptance notes
apiMethodscloses the data API, and Setup offers no Delete, but a delete issued to the engine below the REST door is not refused. No platform path issues one, and whether an automation could is not measured. This is recorded in the ADR OI11 note.bulkis granted. The apiMethods batch conformance ratchet requires it wherever single-record writes are granted. A batch admits only granted child verbs, so a batched delete is still refused; this is pinned insys-unit.object.test.ts.sys_unitstrings. The other nine locales carry the generator's English fill (nav labels are translated in all eleven).Verification
All readings below are on head
298bbb987.Derived gate families (110) and the --ran reconciliation
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 110 families from the tree at298bbb987. Each family was run, and the exit code was captured before any pipe: 110 exited 0, none exited non-zero. This includescheck:dual-build-cjs-loads(124 entry points across 72 packages load) andcheck:i18n-coverage("14 config(s), 423 baselined untranslated string(s), none new").--ranprinted: "Run reconciliation — 110 derived, 110 run, 0 NOT-MEASURED, 0 UNRUN."Overlap check
node scripts/pm/overlap-check.mjsagainst origin/maincf6bb70e2dmerges cleanly, and so do PRs feat(spec): the Studio hook form offers texts, and HookContext declares ctx.text #35510 and fix(settings)!: offer the knowledge settings only where the knowledge service is mounted #34223, which share files: "VERDICT clean exit 0".Not measured locally
check:dev-prereqs(a local-only family) exits 1 with "The workspace is not built — 1 unmet precondition": 35 of 108 workspace packages, all in the UI tree, have nodist/. This is the container's build state, not this diff. It is recorded as NOT MEASURED.integrationlayer,test:repo, and the repo-wide lint are left to CI.!, and Clause-② is a widening.Generated by Claude Code